class Person:
    hair = 'black'

    def __init__(self, name='xiaoming', age=11):
        self.name = name
        self.age = age

    def say(self, content):
        print(content)


p = Person()
print(p.name, p.age)
p.name = 'laowang'
print(p.name, p.age)
p.say("Python easy")
p.skills = ['A', 'B']
print(p.skills)
del p.name


# print(p.name)

def info(self):
    print('----info-------', self)


p.foo = info
p.foo(p)

p.bar= lambda self:print('---lambda-----',self)
p.bar(p)
def info_func(self,content):
    print('我是一个人，信息为：%s' % content)
from types import MethodType
p.intro=MethodType(info_func,p)
p.intro('XXXX')